#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main() {
    float a;
    char n;
    int i = 0;
    scanf("%f %c", &a, &n);
    if (a - (int)a > 0)
    {
        a = (int)a + 1;
    }
    switch (n)
    {
    case 'y':
        i = 20 + (a - 1) * 1 + 5;
        break;
    case 'n':
        i = 20 + (a - 1) * 1;
    }
    printf("%d", i);
    return 0;
}